﻿using UnityEngine;
using System.Collections;

public class TestScript4 : MonoBehaviour {

	public void OnDrawGizmos ()
	{
		Matrix4x4 mat = transform.localToWorldMatrix;
		Vector3 pos = new Vector3 (mat.m03, mat.m13, mat.m23);
		Vector3 xAxis = new Vector3 (mat.m00, mat.m10, mat.m20);
		Vector3 yAxis = new Vector3 (mat.m01, mat.m11, mat.m21);
		Vector3 zAxis = new Vector3 (mat.m02, mat.m12, mat.m22);

		Gizmos.DrawSphere (pos, 0.5f);
		Gizmos.DrawLine (pos, pos + xAxis * 2f);
		Gizmos.DrawLine (pos, pos + yAxis * 2f);
		Gizmos.DrawLine (pos, pos + zAxis * 2f);
	}

}
